//
//  AccountTopItem.m
//  JiuJiuShangCheng
//
//  Created by jiujiukeji on 2018/7/18.
//  Copyright © 2018年 jiujiukeji. All rights reserved.
//

#import "AccountTopItem.h"

@implementation AccountTopItem

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setUpUI];
    }
    return self;
}
- (void)setUpUI
{
    WeakSelf
    self.backgroundColor = UIColorWithRGB(240, 240, 240);
    self.moneyLB = [UILabel labelWithText:@"￥0.00" textColor:UIColorFromRGB(0x333333) fontSize:13];
    [_moneyLB sizeToFit];
    [self addSubview:_moneyLB];
    [_moneyLB mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self).offset(rateHeight(25));
        make.centerX.equalTo(self);
    }];
    self.textLB = [UILabel labelWithText:@"" textColor:UIColorFromRGB(0x333333) fontSize:13];
    [_textLB sizeToFit];
    [self addSubview:_textLB];
    [_textLB mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(weakSelf.moneyLB.mas_bottom).offset(rateHeight(25));
        make.centerX.equalTo(self);
    }];
    self.bottomBtn = [UIButton buttonWithTitle:@"" fontSize:13 titleColor:UIColorWhite background:navBarColor cornerRadius:4];
    [self addSubview:_bottomBtn];
    [_bottomBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.equalTo(self).offset(-rateHeight(10));
        make.size.mas_offset(CGSizeMake(rateWidth(330), rateHeight(80)));
        make.centerX.equalTo(self);
    }];
    
}

@end
